package com.telit.firecommand.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.telit.firecommand.dto.FireHandleDTO;
import com.telit.firecommand.entity.CommFireHandle;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * @Author:zhangwei
 * @Description:
 * @Time:Created on 2021/8/3 18:42
 */
@Repository
public interface CommFireHandleDao extends BaseMapper<CommFireHandle> {

    /**
     * 根据火情id查询火情处理信息
     *
     * @param fireId
     *
     * @return
     */
    CommFireHandle selectByfireId(@Param("fireId") Long fireId);

    /**
     * 分页条件查询火情处理信息
     *
     * @param fireHandleInfoDTOIPage
     * @param fireHandleInfo
     *
     * @return
     */
    IPage<CommFireHandle> selectPageByCondition(IPage<FireHandleDTO> fireHandleInfoDTOIPage,
                                                @Param("fireHandleInfo") CommFireHandle fireHandleInfo);

    /**
     * 无分页条件查询火情处理信息
     *
     * @param fireHandleInfo
     *
     * @return
     */
    List<CommFireHandle> selectByConditionNoPage(@Param("fireHandleInfo") CommFireHandle fireHandleInfo);

    /**
     * 根据火情id查询火情处理信息
     *
     * @param fireId
     *
     * @return
     */
    CommFireHandle queryByFireId(@Param("fireId") Long fireId);

    /**
     * 根据火情id删除数据
     *
     * @param fireId
     */
    void deleteByFireId(@Param("fireId") Long fireId);

}
